<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <title>字典管理</title>
	<script>document.write('<script src="../../plugin/vue/js/import.js?' + Math.random() + '"><' + '/script>');</script>
    <script>_import("../../plugin/vue/js/before.js");</script>
</head>
<body>
	<div id="app" class="container" v-cloak>
        <div class="panel panel-default">
            <div class="panel-heading">
                <h3 class="panel-title"><i class="el-icon-document mr5"></i>字典管理</h3>
            </div>
            <div class="panel-body">
                <!-- search -->      
                <el-card class="box-card mb10 w-boxcard" shadow="never">
                  <div slot="header" class="clearfix">
                    <span class="f16 lh38">查询条件</span>    
                    <el-button class="pull-right" type="primary" @Click="search">查询</el-button>                
                  </div>                                       
                <el-form  label-width="86px">              
                 <el-row :gutter="20">
                	<el-col span="8">
                		<el-form-item label="关键字:">
                			<el-input v-model="keyword" placeholder="请输入关键字"></el-input>
                		</el-form-item>
                	</el-col>
                </el-row>
               	</el-form>
                </el-card> 
                <!-- search END-->
                <el-row :gutter="20">                    
                    <!-- box -->
                    <el-col :span="24">
                        <div class="grid-content">
                            <el-row class="tr mb3">
                            	<el-button type="primary"  @click="newDict">添加</el-button>                       
                            </el-row>
                             <el-table ref="dictTable" :data="dictData" border style="width: 100%;" class="w-tablesub"
                             :expand-row-keys="expands" :row-key="getRowKeys">
								<el-table-column prop="code" label="字典编码">
                                </el-table-column>
                                <el-table-column  label="字典名称" class="w-textsub">
				                    <template slot-scope="scope">
				                        <el-popover trigger="hover" placement="top-start">
				                            <p class="w-tablepop" >{{ scope.row.code_desc }}</p>
				                            <div slot="reference" v-if="scope.row.dict_type==2" style="color:red;">
				                               	 {{ scope.row.code_desc }}			                               
				                            </div>
				                            <div slot="reference" v-else>
				                               	 {{ scope.row.code_desc }}			                               
				                            </div>		                           
				                        </el-popover>
				                    </template>
                				</el-table-column>
                				<el-table-column label="备注" class="w-textsub">
                					<template slot-scope="scope">
				                        <el-popover trigger="hover" placement="top-start">
				                            <p class="w-tablepop" >{{ scope.row.remarks }}</p>
				                            <div slot="reference">
				                               	 {{ scope.row.remarks }}			                               
				                            </div>		                           
				                        </el-popover>
				                    </template>
                                </el-table-column>                             
                                <el-table-column label="操作">
                                     <template slot-scope="scope">
                                     	<span style="font-size:18px">
                                     		<i class="el-icon-share" title="查看" @click="detail(scope.row)" style="cursor:pointer;"></i>
                                     		<i class="el-icon-edit-outline" title="编辑" @click="edit(scope.row)" style="cursor:pointer;"></i>
                                     		<!-- 系统  删除灰色， 不能点击 -->
                                     		<i class="el-icon-delete" v-if="scope.row.dict_type==2" title="不能删除" style="cursor:not-allowed;color:#DCDCDC;"></i>
                                     		<i class="el-icon-delete" v-else title="删除" @click="del(scope.row,0)" style="cursor:pointer;"></i>
                                     	</span>
                                     </template>
                                </el-table-column>    
                                 
                                <el-table-column type="expand" width="1">
	                              	<template slot-scope="props">
	                      <!--        <comlist ref="clist" v-if="showDetail" :args.sync="curRowOption" ></comlist> -->
	                               		   <div v-if="showDetail" style="max-height: 220px; overflow: auto; margin-top:15px;">
	                               		   		<el-table :data="detailData" border style="width: 100%;" class="w-tablesub">
										        	<el-table-column prop="code" label="字典编码">
					                                </el-table-column>
					                                <el-table-column  label="字典名称" class="w-textsub">
									                    <template slot-scope="scope">
									                        <el-popover trigger="hover" placement="top-start">
									                            <p class="w-tablepop" >{{ scope.row.code_desc }}</p>
									                            <div slot="reference" v-if="scope.row.dict_type==2" style="color:red;">
									                               	 {{ scope.row.code_desc }}			                               
									                            </div>
									                            <div slot="reference" v-else>
									                               	 {{ scope.row.code_desc }}			                               
									                            </div>		                           
									                        </el-popover>
									                    </template>
					                				</el-table-column>
					                				<el-table-column prop="remarks" label="备注">
					                                </el-table-column>                  
										        	<el-table-column label="操作">
										                <template slot-scope="scope">
										               		<i class="el-icon-delete" v-if="scope.row.dict_type==2" title="不能删除" style="cursor:not-allowed;color:#DCDCDC;"></i>
                                     						<i class="el-icon-delete" v-else title="删除" @click="del(scope.row,1)" style="cursor:pointer;"></i>
										                </template>
										            </el-table-column> 
					        					</el-table>
		        							</div>
			                        </template>
		                        </el-table-column>    
		              
		                  	</el-table> 
                            
                            <div class="block mt10">
                                <el-pagination @size-change="handleSizeChange"
                                    @current-change="handleCurrentChange"
                                    :current-page="currentPageNbr" :page-sizes="pageSizes"
                                    :page-size="pageSize" class="w-tc"
                                    layout="total, sizes, prev, pager, next, jumper"
                                    :total="totalRecords"> </el-pagination>
                            </div>
                        </div>
                    </el-col>
                    
                </el-row>
            </div>
        </div>    
         
        <jwb-dialog ref="dcdg"></jwb-dialog>
    </div>
<script>
    _import("../../plugin/vue/js/after.js");
</script> 
<script>
    _import("js/dictlist.js");
</script>
</body>
</html>